package ttot.extensionmanager.api;

import java.util.LinkedList;
import java.util.List;

public class ExtensionManagerException extends Exception {

	private static final long serialVersionUID = 1L;
	
	private List<Exception> exceptions = new LinkedList<Exception>();
	
	public ExtensionManagerException(String message) {
		super(message);
	}
	
	public ExtensionManagerException(String message, Throwable throwable) {
		super(message, throwable);
	}
	
	public ExtensionManagerException(String message, List<Exception> exceptions) {
		super(message);
		this.exceptions.addAll(exceptions);
	}
	
	public List<Exception> getExceptions() {
		return exceptions;
	}
	
	public Boolean hasExceptions() {
		return exceptions.size() > 0;
	}

}
